home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / dvlprstc.hqx / Developer Stack 1.3r / card_23330.txt < prev    next >
Text File  |  1991-04-30  |  2KB  |  80 lines

  1. -- card: 23330 from stack: in.3r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 14090
  5. -- name: CompactStacks
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=183 top=217 right=249 bottom=334
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Compact Stacks
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put "Select stack to be compacted.  'Cancel' when finished"
  24.   repeat forever
  25.     put filename("STAK") into compactThis
  26.     if compactThis is empty then
  27.       hide message
  28.       exit mouseup
  29.     end if
  30.     if the freesize of compactThis =0 then
  31.       beep
  32.       put "No wasted space in this stack"
  33.     else
  34.       set cursor to 4
  35.       put "Compacting the stack by "&(the freesize of compactThis)&" bytes"
  36.       push this card
  37.       set lockscreen to true
  38.       set lockmessages to true
  39.       go to compactThis
  40.       domenu compact stack
  41.       pop card
  42.       set lockscreen to false
  43.       set lockmessages to false
  44.       put "Select stack to be compacted.  'Cancel' when finished"
  45.     end if
  46.   end repeat
  47.   hide message
  48. end mouseUp
  49.  
  50.  
  51.  
  52. -- part 2 (field)
  53. -- low flags: 00
  54. -- high flags: 0007
  55. -- rect: left=63 top=49 right=201 bottom=479
  56. -- title width / last selected line: 0
  57. -- icon id / first selected line: 0 / 0
  58. -- text alignment: 0
  59. -- font id: 3
  60. -- text size: 12
  61. -- style flags: 0
  62. -- line height: 16
  63. -- part name: 
  64.  
  65.  
  66. -- part contents for background part 5
  67. ----- text -----
  68. 7
  69.  
  70. -- part contents for background part 12
  71. ----- text -----
  72. CompactStacks
  73.  
  74. -- part contents for card part 2
  75. ----- text -----
  76. This will let you select stacks from a standard dialog box, and automatically compact them if they need compacting.
  77.  
  78. -- part contents for background part 13
  79. ----- text -----
  80. Buttons